import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/index/index.vue'

Vue.use(VueRouter)
const originalPush = VueRouter.prototype.push
// 修改 原型对象中的push方法
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}


const routes = [
  {
    path: '/',
    name: 'index',
    component: Index,
    meta: {
      isShowTabBar: true//显示,

    }
  },
  {
    path: '/lpList',
    name: 'lpList',
    component: () => import('../views/lpList/lpList.vue'),
    meta: {
      isShowTabBar: true,//显示
      // keepAlive: true
    }
  },
  {
    path:"/fixedBox/:type",
    name:'fixedBox',
    component:() => import("../views/fixedBox/index.vue"),
    meta:{
      isShowTabBar: false,
    }
  },
  {
    path:"/people/:type",
    name:'people',
    component:() => import("../views/people/index.vue"),
    meta:{
      isShowTabBar: false,
    }
  },
  {
    path:"/myList",
    name:'myList',
    component:() => import("../views/myList/index.vue"),
    meta:{
      isShowTabBar: false,
    }
  },
  {
    path:"/money",
    name:'money',
    component:() => import("../views/money/index.vue"),
    meta:{
      isShowTabBar: false,
    }
  },
  // {
  //   path: '/abnormalList',
  //   name: 'abnormalList',
  //   component: () => import('../views/list/abnormalList.vue'),
  //   meta: {
  //     isShowTabBar: true,//显示
  //     keepAlive: true
  //   }
  // },
 
 
 
 

 
  

  
  
  
  

]

const router = new VueRouter({
  // mode: 'history',
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
